package ace.cmp.openfeign.autoconfig;

import ace.cmp.openfeign.core.AceFeignClientBuilder;
import ace.cmp.openfeign.core.properties.FeignClientsProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author caspar
 * @date 2023/3/24 9:08
 */
@EnableConfigurationProperties({FeignClientsProperties.class})
@Configuration
public class OpenFeignAutoConfig {

  @Bean
  public AceFeignClientBuilder feignClientBuilder(ApplicationContext applicationContext) {
    return new AceFeignClientBuilder(applicationContext);
  }
}
